function charIsLetter(ch) {
    return ch.toLowerCase() != ch.toUpperCase();
}
function charIsNumber(ch) {
    return ch >= "0" && ch <= "9";
}
function charIs(ch, chars) {
    for (var i = 0; i < chars.length; i++) {
        if (ch == chars.charAt(i))
            return true;
    }
    return false;
}
function charIsLetterNumberOr(ch, chars) {
    for (var i = 0; i < chars.length; i++) {
        if (ch == chars.charAt(i))
            return true;
    }
    return ch >= "0" && ch <= "9" || ch.toLowerCase() != ch.toUpperCase();
}
function isHere(a, pos, b) {
    if (a.length < b.length + pos.pos)
        return false;
    for (var i = 0; i < b.length; i++) {
        if (a.charAt(pos.pos + i) != b.charAt(i))
            return false;
    }
    return true;
}
function trim(s, pos) {
    while (s.charAt(pos.pos) == " " && pos.pos < pos.endpos)
        pos.pos++;
}
function trimc(s, pos, letters) {
    while (charIs(s.charAt(pos.pos), letters) && pos.pos < pos.endpos)
        pos.pos++;
}
function readTo(script, pos, chars) {
    var ns = pos.pos;
    while (!charIs(script.charAt(pos.pos), chars)) {
        pos.pos++;
    }
    return script.substring(ns, pos.pos);
}
function shallowCopy(v) {
    var res = {};
    for (var p in v) {
        res[p] = v[p];
    }
    return res;
}

var Pos = (function () {
    function Pos(endpos, pos) {
        if (typeof pos === "undefined") { pos = 0; }
        this.endpos = endpos;
        this.pos = pos;
    }
    return Pos;
})();
//# sourceMappingURL=husty-funkcicky.js.map
